-
Notifications
You must be signed in to change notification settings - Fork 350
app: kconfig: allow FLIX generation #10511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This sets the toolchain kconfig to allow generating FLIX instructions as it is disabled by default on Zephyr upstream. Signed-off-by: Daniel Leung <[email protected]>
|
@lgirdwood @kv2019i When updating to the latest Zephyr SHA, you will need the kconfig to restore the previous behavior of FLIX instruction generation. |
|
I was misled by the Zephyrs PR title "cmake: toolchain/xt-clang: allow to skip FLIX generation". The title suggested adding an option to optionally disable FLIX generation, not changing the default behavior to disable it. The PR description explicitly states that:
Based on that, I expected an opt-out mechanism only, without altering the default state. If FLIX needs to be disabled for sof application configuration, it should be done explicitly in the Linux overlay, without unnecessarily degrading performance or changing defaults for other platforms. |
|
|
||
| # Allow compiler to determine whether to generate FLIX instructions. | ||
| choice COMPILER_CODEGEN_VLIW | ||
| default COMPILER_CODEGEN_VLIW_AUTO if "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "xt-clang" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VLIW is a generic term which can be a project default (AUTO) state regardless of compiler, no need to specify xt-clang here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure GCC cant emit VLIW for xtensa so it will need some check for Cadence compilers like above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"AUTO" != "enabled", it means compiler will decide (use default config)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"AUTO" != "enabled", it means compiler will decide (use default config)
ok, so you are confirming no impact for GCC here and Zephyr SDK i.e. I just want to confirm we wont be passing any --enable-flix=auto type arguments to GCC which it wont understand if we remove the compiler check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is only a configuration option, not a value passed to the compiler command line. The "auto" value does not result in setting any compile options.
https://github.com/zephyrproject-rtos/zephyr/blob/b4108b53f6d7ca8c1da596c7130318e64e26eaf0/CMakeLists.txt#L562-L568
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
|
||
| # Allow compiler to determine whether to generate FLIX instructions. | ||
| choice COMPILER_CODEGEN_VLIW | ||
| default COMPILER_CODEGEN_VLIW_AUTO if "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "xt-clang" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure GCC cant emit VLIW for xtensa so it will need some check for Cadence compilers like above.
|
The original idea was to add an option to disable it on demand. However, it turned out that FLIX was causing multiple CI failures so that needs to be disabled by default. Zephyr main should provide a stable foundation for others to build on. Hence this PR to re-enable it to keep the old behavior. |
This sets the toolchain kconfig to allow generating FLIX instructions as it is disabled by default on Zephyr upstream.